<html>
<head>
<script>
var x, y;
function getXY(e)
{
    x = e.offsetLeft + e.offsetWidth / 2;
    y = e.offsetTop + e.offsetHeight / 2 - 5;
    o = e.offsetParent;
    while (o) {
        x += o.offsetLeft;
        y += o.offsetTop;
        o = o.offsetParent;
    }
}
function runTest()
{
    if (!window.testRunner)
        return;
        
    testRunner.waitUntilDone();
    setTimeout(stepOne, 0);
}
function stepOne()
{
    var start = document.getElementById("start");
    getXY(start);
    eventSender.dragMode = false;
    eventSender.mouseMoveTo(x, y);
    eventSender.mouseDown();
    eventSender.mouseMoveTo(x, y + 10);
    eventSender.mouseMoveTo(x, y + 15);
    eventSender.mouseMoveTo(x, y + 20);
    eventSender.mouseMoveTo(x, y + 25);
    eventSender.mouseMoveTo(x, y + 30);
    eventSender.mouseMoveTo(x, y + 35);
    setTimeout(stepTwo, 100);
}
function stepTwo()
{
    eventSender.mouseUp();
    testRunner.notifyDone();
}
</script>
<style type="text/css">
#scroller {
    position: absolute;
    top: 60px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    overflow: overlay;
}
#contentarea {
    position: absolute;
    padding-right: 11px;
    padding-left: 11px;
    font: 10px Ahem;
    line-height: 10px;
}
</style>
<title>Test for REGRESSION: Cannot select text in RSS view</title>
</head>
<body>
<p>This tests for a bug where autoscroll code would prevent text from being selected. To run manually create a selection by clicking somewhere in the first sentence of the paragraph below and dragging downward.</p>
<div id="scroller">
<div id="contentarea">
<div>Lorem <span id="start">ipsum</span> dolor sit amet, consectetuer adipiscing elit. Integer vehicula accumsan massa. Quisque elementum. Cras id neque a mi rutrum scelerisque. Nulla sed dui a massa sodales posuere. Nulla libero. Nulla posuere, felis id tincidunt tincidunt, ipsum metus tristique risus, et convallis turpis elit eget massa. Nunc consectetuer dolor vel nunc. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque dapibus ante et nulla. Cras nec velit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Integer ut tortor.</div>
</div>
</div>
<script>runTest();</script>
</body>
</html>
